import Vue from 'vue'
import App from './App'
import * as Api from './config/api.js'
import * as Common from './config/common.js'
import * as Db from './config/db.js'
import * as Config from './config/config.js'
import store from './store'
import util from 'utils/util'
import './common/uni-H5Api'
// #ifdef H5
import * as wx from './static/js/wx.js'
// #endif
// 将时间戳转日期格式的过滤器
Vue.filter('formatDate', (dataStr) => {
	dataStr = dataStr * 1000
	  var time = new Date(dataStr);
	  function timeAdd0(str) {
	    if (str < 10) {
	      str = '0' + str;
	    }
	    return str
	  }
	  var y = time.getFullYear();
	  var m = time.getMonth() + 1;
	  var d = time.getDate();
	  var h = time.getHours();
	  var mm = time.getMinutes();
	  var s = time.getSeconds();
	  return y + '-' + timeAdd0(m) + '-' + timeAdd0(d) + ' ' + timeAdd0(h) + ':' + timeAdd0(mm) + ':' + timeAdd0(s);
});
Vue.config.productionTip = false
Vue.prototype.$api = Api;
Vue.prototype.$common = Common;
Vue.prototype.$db = Db;
Vue.prototype.$config = Config;
Vue.prototype.$store = store;
Vue.prototype.$util = util;
// #ifdef H5
Vue.prototype.$wx = wx;
// #endif

App.mpType = 'app'

const app = new Vue({
    ...App
})
app.$mount()
